package pattern12;

/**
 * p158
 * 状态模式
 * @author wdl
 */
public class StatePattern {
    public static void main(String[] args) {
        //设置Context类的初始化状态
        Context c=new Context(new ConcreteStateA());
        //不断的请求，改变状态
        c.request();
        c.request();
        c.request();
        c.request();
    }
}
